package excercise;

public class ex_06 {

	public static void main(String[] args) {

		// #21 세금계산기
		int 연봉 = 5000;
		boolean 미혼 = true;

		if (미혼) {
			if (연봉 < 3000) {
				System.out.println(연봉 * 0.1);
			} else {
				System.out.println(연봉 * 0.25);
			}
		}

		else {
			if (연봉 < 6000) {
				System.out.println(연봉 * 0.1);
			}

			else {
				System.out.println(연봉 * 0.25);
			}

		}

		// #22
		int thisyear = 2000;

		if (thisyear % 4 == 0 && thisyear % 100 != 0)
			System.out.println("윤년입니다~~!");
		else if (thisyear % 400 == 0)
			System.out.println("윤년입니다~~!");
		else
			System.out.println("윤년이 아닙니다!");

		// 30
		// System.out.println(" 	   Multiplication Table");
		 System.out.println("     1    2    3    4    5    6    7    8    9    ");
		 System.out.println("---------------------------------------");
		// System.out.println("1 | 1    2    3    4    5    6    7    8    9");
		// System.out.println("2 | 2    4    6    8   10  12  14  16  18");

		
		for (int i = 1; i <= 9; ++i) {

			if (i == 1)	System.out.print(i * 1 + "  |");
			System.out.print("     " + i);
		}
		System.out.println();// 줄바꿈

		for (int i = 1; i <= 9; ++i) {
			if (i == 1)System.out.print(i * 2 + "  |");
			System.out.print("     " + (i * 2));
		}
		System.out.println();
		
		for (int i = 1; i <= 9; ++i) {
			if (i == 1)System.out.print(i * 3 + "  |");
			System.out.print("     " + (i * 3));
			}
		System.out.println();
		for (int i = 1; i <= 9; ++i) {
			if (i == 1)System.out.print(i * 4 + "  |");
			System.out.print("     " + (i * 4));}
		System.out.println();
		for (int i = 1; i <= 9; ++i) {
			if (i == 1)System.out.print(i * 5 + "  |");
			System.out.print("     " + (i * 5));}
System.out.println();
for (int i = 1; i <= 9; ++i) {
	if (i == 1)System.out.print(i * 6 + "  |");
	System.out.print("     " + (i * 6));}
System.out.println();
for (int i = 1; i <= 9; ++i) {
	if (i == 1)System.out.print(i * 7 + "  |");
	System.out.print("     " + (i * 7));}
System.out.println();
for (int i = 1; i <= 9; ++i) {
	if (i == 1)System.out.print(i * 8 + "  |");
	System.out.print("     " + (i * 8));}
System.out.println();
for (int i = 1; i <= 9; ++i) {
	if (i == 1)System.out.print(i * 9 + "  |");
	System.out.print("     " + (i * 9));}
System.out.println();



/**********************************/
for(int j =1;j<=9;++j){

for (int i = 1; i <= 9; ++i) {

	if (i == 1)	System.out.print(i * j + "  |");
	System.out.print("     " + i*j);
}
System.out.println();
// 줄바꿈
}

	
	
	
	
	}
}




